import { Component } from "react";
import './List.css'
import { Item } from '../Item/Item'

export class List extends Component {
    render(){
        const {todos, removeTodoItem, checkBoxChanged} = this.props
        return (
            <ul className="todo-main">
                {todos.map(todo => <Item key={todo.id} {...todo} removeTodoItem={removeTodoItem} checkBoxChanged={checkBoxChanged}/>)}
            </ul>
        )
    }
}